<template>
  <view class="module">
    <view v-for="item in EmojiList" :key="item.unicode" class="emoji" @click="handleSelectEmoji(item.emoji)">
      {{item.emoji}}
    </view>
  </view>
</template>

<script>
export default {
  name: 'RongIMEmojiModule',
  data() {
    return {
      EmojiList: this.$RongIMLib.RongIMEmoji.list
    }
  },
  onLoad() {
    // console.log('************表情列表***************')
    // console.log(this.$RongIMLib.RongIMEmoji.list)
  },
  methods: {
    handleSelectEmoji (emoji) {
      this.$emit('addEmoji', emoji);
    }
  }
}
</script>

<style lang="scss" scoped>
.module {
  display: flex;
  flex-wrap: wrap;
  box-sizing: border-box;
  padding: 30upx 33upx;
  max-height: 480upx;
  overflow: scroll;
  .emoji {
    text-align: center;
    width: 57upx; 
    height: 57upx;
  }
}
</style>